package com.smart.manager.pop.entities.models;

import com.smart.common.entities.core.BaseLongModel;
import com.smart.manager.member.entities.views.MemberView;
import com.smart.manager.pop.entities.assembler.ShareData;
import com.smart.manager.pop.entities.views.ActivityMainView;
import io.ebean.annotation.DbJson;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import java.time.LocalDateTime;

/**
 * 活动C2C参与记录
 * @author Administrator
 */
@EqualsAndHashCode(callSuper = true)
@Entity
@Data
@Accessors(chain = true)
public class PopC2cAttend extends BaseLongModel {

    @ApiModelProperty(value = "活动ID")
    @ManyToOne
    @JoinColumn(name = "activity" ,referencedColumnName = "id")
    private ActivityMainView activity;


    @ManyToOne
    @JoinColumn(name = "member" ,referencedColumnName = "id")
    private MemberView member;

    @ApiModelProperty(value = "分享数据")
    @DbJson
    private ShareData shareData;


    @ApiModelProperty(value = "参与时间")
    private LocalDateTime attendTime;


    @ApiModelProperty(value = "达成总数")
    private Integer achievedTotal ;


    @ApiModelProperty(value = "奖品领取次数")
    private Integer prizeTotal ;


}
